package com.hsd.service.Impl;

import com.hsd.entity.Category;
import com.hsd.mapper.CategoryMapper;
import com.hsd.service.ICategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ICategoryServiceImpl implements ICategoryService {

    @Resource
    private CategoryMapper categoryMapper;

    /**
     * 查询所有的分类
     * @return
     */
    public List<Category> findAll() {
        return categoryMapper.selectAll();
    }

    /**
     * 通过标记显示该标记下的所有的分类
     * @param tag
     * @return
     */
    @Override
    public Category findByTag(String tag) {
        return categoryMapper.slectByTag(tag);
    }


}
